package com.ilongsay.service.impl;

import com.ilongsay.dao.BillSqliteDetailDao;
import com.ilongsay.entity.FaPiaoDetail;
import com.ilongsay.service.IBillDetailSqliteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author ilongsay
 * @Email ilongsay@163.com
 * @Copyright 版本所有，侵权必究！
 * @Datetime 2018-11-18 12:26
 * @Describution
 */
@Service("billDetailSqliteService")
public class BillDetailSqliteServiceImpl implements IBillDetailSqliteService{

    @Autowired
    private BillSqliteDetailDao billSqliteDetailDao;

    public void insertBillDetail(List<FaPiaoDetail> list) {
        billSqliteDetailDao.insertBillDetail(list);
    }

    @Override
    public List<FaPiaoDetail> findAllBillDetail() {
        return billSqliteDetailDao.findAllBillDetail();
    }

    @Override
    public List<FaPiaoDetail> findBillByBillCode(String billCode) {
        return billSqliteDetailDao.findBillDetailByBillCode(billCode);
    }

    @Override
    public void updateBillDetail(String newBillCode, String oldBillCode) {
        billSqliteDetailDao.upadateBillDetail(newBillCode, oldBillCode);
    }
}
